package com.derbysoft.synxisadapter.commons.repository;

import com.derbysoft.core.Limit;
import com.derbysoft.core.LimitedList;
import com.derbysoft.synxisadapter.commons.model.Hotel;
import com.derbysoft.synxisadapter.commons.repository.impl.HotelCondition;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

public interface HotelRepository {
    Hotel findByPassport(String passport);

    Hotel findByPassport(String passport, Hotel.Status status);

    Hotel findById(String id);

    LimitedList<Hotel> findByCondition(HotelCondition condition, Limit limit);

    void create(String id, String passport, String name, String providerPassport, String providerName);

    void update(String id, String passport, String name, String providerPassport, String providerName, Hotel.Status status);

    void saveAll(List<Hotel> hotels);

    @Transactional(readOnly = false)
    void disableAll(List<Hotel> hotels);

    @Transactional(readOnly = false)
    void delete(Hotel hotel);

    @Transactional(readOnly = false)
    void save(Hotel hotel);
}
